// 类型断言
function getAge(a: number | string): number {
    // as  当作
    let a1 = a as string;
    if (a1.length) {

        return a1.length;
    } else {
        let a2 = a as number
        return a2;
    }


}
console.log(getAge('11234'));
